package cn.bavelee.restartsystemui;

import android.app.Activity;
import android.os.Bundle;

import java.io.DataOutputStream;
import java.io.OutputStream;

/**
 * Created by Bave on 2018/1/27.
 */

public class A extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        try {
            Process p = Runtime.getRuntime().exec("su");
            OutputStream outputStream = p.getOutputStream();
            DataOutputStream dataOutputStream = new DataOutputStream(outputStream);
            dataOutputStream.writeBytes("pkill -f com.android.systemui");
            dataOutputStream.flush();
            dataOutputStream.close();
            outputStream.close();
        } catch (Throwable t) {
            t.printStackTrace();
        }
        finish();
    }
}
